﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="eTruck.Views.Users.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>登录页面</title>
    <link rel="stylesheet" type="text/css" href="<%=Page.ResolveClientUrl("~/Styles/themes/default/easyui.css")%>"/>
	<link rel="stylesheet" type="text/css" href="<%=Page.ResolveClientUrl("~/Styles/themes/icon.css")%>"/>
	<script type="text/javascript" src="<%=Page.ResolveClientUrl("~/Scripts/jquery.min.js")%>"></script>
	<script type="text/javascript" src="<%=Page.ResolveClientUrl("~/Scripts/jquery.easyui.min.js")%>"></script>
    <script type="text/javascript">
        $(function () {

            $('#dlg').parent().appendTo($("form:first"));
        });
    </script>
    <script type="text/javascript">
        function login() {
            //check user name and password , not allow empty
            var username = $("#<%=txtUserName.ClientID %>");
            var pwd = $("#<%=txtPassword.ClientID %>");
            if (username.val().length == 0) {
                alert("用户名不允许为空");
                username.focus();
                return;
            }
            if (pwd.val().length == 0) {
                alert("密码不允许为空");
                pwd.focus();
                return;
            }

            //begin to login
            $('[id$=btnLogin]').click();
        }
    </script>
    <style type="text/css">
        .ss_login_name
        {
            text-align: right;
        }
    </style>
</head>
<body >
 
    <form id="form1" runat="server">
    
    <div id="div1" style="position:fixed; top:0; left:0; bottom:0; right:0; z-index:-1;">
        <img  src="../../Image/Welcome.jpg" style="height:100%; width:100%; border:0;"   />
        </div> 
        <div id="dlg" class="easyui-dialog" title="登录窗口" style="width: 300px;
                height: 150px; padding: 10px"  closable="false">
                <table>
                    <tr>
                        <td class="ss_login_name">
                            用户名:
                        </td>
                        <td class="ss_login_value">
                            <asp:TextBox ID="txtUserName" runat="server" Width="200px" MaxLength="20" ></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="ss_login_name">
                            密码:
                        </td>
                        <td class="ss_login_value">
                            <asp:TextBox ID="txtPassword" runat="server" Width="200px" MaxLength="32" TextMode="Password" ></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <input type="button" id="btnSubmit" name="submit" value="登录" onclick="login()"/>
                
            </div>
            <div style=" visibility:hidden;">
                
            <asp:Button ID="btnLogin" runat="server" Text="登录" 
                    onclick="btnLogin_Click"/>
            </div>
    </form>
</body>
</html>
